<definitions 
  xmlns="http://www.omg.org/spec/BPMN/20100524/MODEL"
  xmlns:camunda="http://camunda.org/schema/1.0/bpmn"
  targetNamespace="Examples">

  <process id="sendMailExample"  isExecutable="true">

    <startEvent id="theStart" />
    <sequenceFlow sourceRef="theStart" targetRef="sendMail" />
    
    <serviceTask id="sendMail" camunda:type="mail">
      <extensionElements>
        <camunda:field name="from" expression="${sender}" />
        <camunda:field name="to" expression="${recipient}" />
        <camunda:field name="subject" expression="Your order ${orderId} has been shipped" />
        <camunda:field name="html">
          <camunda:expression>
            <![CDATA[
              <html>
                <body>
                  Hello ${male ? 'Mr.' : 'Mrs.' } ${recipientName},<br/><br/>
                  
                  As of ${now}, your order <b>has been processed and shipped</b>.<br/><br/>
                  
                  Kind regards,<br/>
                  
                  TheCompany.
                </body>
              </html>
            ]]>
          </camunda:expression>
        </camunda:field>      
      </extensionElements>
    </serviceTask>
    <sequenceFlow sourceRef="sendMail" targetRef="theEnd" />
    
    <endEvent id="theEnd" />

  </process>

</definitions>